package com.gzhryc.shared_device.oem.code.business.dao.enums;

public class CouponActivityEnum {

    public static enum State {

        WaitEnable(1, "待启用"), Enable(2, "启用"), Overdue(3, "已过期");

        private Integer index;
        private String note;

        State(Integer index, String note) {
            this.index = index;
            this.note = note;
        }

        public Integer index() {
            return index;
        }

        public String note() {
            return note;
        }

        public static String note(Integer index) {
            State[] temp = State.values();
            for (int i = 0; i < temp.length; i++) {
                State item = temp[i];
                if (item.index.equals(index)) {
                    return item.note;
                }
            }
            return null;
        }
    }

    public static enum Type {

        Scan(1, "扫码领取"), NewPeople(2, "新人领取"), OrderFinish(3, "订单完成"), HandSend(4, "手动发放");

        private Integer index;
        private String note;

        Type(Integer index, String note) {
            this.index = index;
            this.note = note;
        }

        public Integer index() {
            return index;
        }

        public String note() {
            return note;
        }

        public static String note(Integer index) {
            Type[] temp = Type.values();
            for (int i = 0; i < temp.length; i++) {
                Type item = temp[i];
                if (item.index.equals(index)) {
                    return item.note;
                }
            }
            return null;
        }
    }
    
    public static enum UseRange {

        Unlimited(1, "不限制"), DesignatedPlace(2, "指定网点");

        private Integer index;
        private String note;

        UseRange(Integer index, String note) {
            this.index = index;
            this.note = note;
        }

        public Integer index() {
            return index;
        }

        public String note() {
            return note;
        }

        public static String note(Integer index) {
            UseRange[] temp = UseRange.values();
            for (int i = 0; i < temp.length; i++) {
                UseRange item = temp[i];
                if (item.index.equals(index)) {
                    return item.note;
                }
            }
            return null;
        }
    }

    public static enum UseLimit {

        Unlimited(1, "不限制"), LimitBusinessType(2, "限制业务类型");

        private Integer index;
        private String note;

        UseLimit(Integer index, String note) {
            this.index = index;
            this.note = note;
        }

        public Integer index() {
            return index;
        }

        public String note() {
            return note;
        }

        public static String note(Integer index) {
            UseLimit[] temp = UseLimit.values();
            for (int i = 0; i < temp.length; i++) {
                UseLimit item = temp[i];
                if (item.index.equals(index)) {
                    return item.note;
                }
            }
            return null;
        }
    }
}
